package com.studyhub.api.problem.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 回答展示VO
 * 
 * @author StudyHub Team
 */
@Data
@Schema(name = "AnswerVO", description = "回答展示信息")
public class AnswerVO {

    @Schema(description = "回答ID")
    private Long id;

    @Schema(description = "问题ID")
    private Long problemId;

    @Schema(description = "回答用户ID")
    private Long userId;

    @Schema(description = "回答用户昵称")
    private String userNickname;

    @Schema(description = "回答用户头像")
    private String userAvatar;

    @Schema(description = "回答内容")
    private String content;

    @Schema(description = "点赞数量")
    private Integer likeCount;

    @Schema(description = "踩数量")
    private Integer dislikeCount;

    @Schema(description = "是否最佳答案：0-否，1-是")
    private Integer isBest;

    @Schema(description = "当前用户是否已点赞")
    private Boolean isLiked;

    @Schema(description = "当前用户是否已踩")
    private Boolean isDisliked;

    @Schema(description = "评论列表")
    private List<CommentVO> comments;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
}
